package com.sunny.passbook.security;

/**
 * 使用threadLocal存储每个线程携带的 Token信息
 */
public class AccessContext {
    private static final ThreadLocal<String> tocken = new ThreadLocal<>();

    public static String getTocken() {
        return tocken.get();
    }

    public static void setTocken(String tokenStr) {
        tocken.set(tokenStr);
    }

    public static void clearAccessKey() {
        tocken.remove();
    }
}
